package Szadoban;

import java.awt.Image;

import javax.swing.ImageIcon;

/**
 * Class of the main hero
 */
public class Player extends Element{
	
	/**
	 * Player constructor
	 * @param x
	 * @param y
	 */
	public Player(int x, int y){
		super(x, y);
		Image image = new ImageIcon(this.getClass().getResource("/player.png")).getImage();
		this.setImage(image);
	}
	
	/**
	 * Moves the player to the specified place
	 * @param x
	 * @param y
	 */
	public void move(int x, int y){
		this.setX(this.getX() + x);
		this.setY(this.getY() + y);
	}

}
